import React, { Component } from 'react';
import './index.css'

class DataTable extends Component {
  constructor(props) {
    super(props);
  }
  render () {
    return (
      <div className="dataTable">
        <div className="dataTable-row">
          <div>日期</div>
          <div>单位净值</div>
          <div>累计净值</div>
        </div>
        {this.props.list.map(v => (
          <div className="dataTable-row" key={v.id}>
            <div>{v.lastestDate}</div>
            <div>{v.newestNetvalue}</div>
            <div>{v.newestNetvalue}</div>
          </div>
        ))}
      </div>
    )
  }
}

export default DataTable;